package ioc;

import org.junit.Test;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

@SuppressWarnings("deprecation")
public class BeanFacatoryTest {

	@Test
	public void testSimpleLoad() {
		BeanFactory bf = new XmlBeanFactory(new ClassPathResource("spring-test.xml"));
		MyTestBean myTestBean = (MyTestBean) bf.getBean("myTestBean");
		assert ("testStr".equals(myTestBean.getTestStr()));
		System.out.println(myTestBean.getTestStr());
	}

}
